<T:ViewBase x:Class="WPFExcelReport.TWBH02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"   
                    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                    xmlns:me="clr-namespace:WPFExcelReport"  
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"    
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"  
                    Name="TV"
                    Background="White"    
                    Loaded="Window_Loaded"
     >
    <T:ViewBase.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/> 
        <ucd:Divideby1000  x:Key="d1000"/> 
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </T:ViewBase.Resources>
      <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="1*"></RowDefinition>
                </Grid.RowDefinitions>
        <StackPanel  >
            <WrapPanel Height="34">
                <Label Content="{Binding Source={Localization:Translate Word=花型号：}}"    Width="Auto" Margin="10,0,0,0"     FontSize="18"  Foreground="#FF141111" />
                <TextBox  Text="{Binding ART,ElementName=TV}" Name="textART" Width="100" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink"  
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="20"   Foreground="#FF141111" />
                <Label Content="{Binding Source={Localization:Translate Word=验布日期从}}"   HorizontalAlignment="Left" Margin="10,5,0,0"  Width="Auto" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0"    Panel.ZIndex="4"
                            Text="{Binding FROMDATE,ElementName=TV}"
                                    SelectedDateChanged ="FROM_DATE_SelectedDateChanged" Width="126" />
                <Label Content="{Binding Source={Localization:Translate Word=到}}" Height="28" HorizontalAlignment="Left" Margin="10,5,0,0"   Width="Auto" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0"   VerticalAlignment="Top" Panel.ZIndex="5"
                                  Text="{Binding ENDDATE,ElementName=TV}"    SelectedDateChanged ="END_DATE_SelectedDateChanged" Width="122" />
                <CheckBox  Margin="5,0,0,0" Background="White"   IsChecked="{Binding IsChkArt,ElementName=TV}" Height="19" Width="80">合并信息</CheckBox>
                <Button Content="{Binding Source={Localization:Translate Word=查询}}" Height="33" Margin="10,0,0,0"   Width="96" Panel.ZIndex="9"
                        Click="QueryCommand"/>
                <Button Content="{Binding Source={Localization:Translate Word=导出}}" Height="33" Margin="10,0,0,0"   Width="100" Panel.ZIndex="10"
                    Click="PrintCommand"   />
            </WrapPanel>
            <WrapPanel Visibility="Collapsed">
                <Label Content="{Binding Source={Localization:Translate Word=花型号：}}"    Width="70" Margin="10,0,0,0"   />
                <TextBox Name="txtART"  Text="{Binding dwWBFEHL.ARTICLE}"  Width="100" Margin="5,0,0,0"  HorizontalAlignment="Left" />
                <Button Content="{Binding Source={Localization:Translate Word=筛选}}" Click="Filter_Click"></Button>
                <Button Content="{Binding Source={Localization:Translate Word=清除}}" Click="ClearFilter_Click"></Button>
            </WrapPanel>
        </StackPanel>
       
            <DataGrid  Grid.Row="1" Grid.Column="0"
                   Grid.RowSpan="2"
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"
                   Name="dlgMaster"
                   ItemsSource="{Binding Source={StaticResource vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                    >
            <DataGrid.Columns>
                <!--WBBEINDAT	ARTICLE	WBBSTKNR	DEFECT	WBFFSCHL	DEFMTR	STAFF	WBBWBMLFDNR	WBBWARSCH	PCEMTR-->
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=检验日期}}" Binding="{Binding WBBEINDAT}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=小花号}}" Binding="{Binding ARTICLE}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=布卷号}}" Binding="{Binding WBBSTKNR}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=疵点}}" Binding="{Binding DEFECT}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=描述}}" Binding="{Binding WBFFSCHL,Converter={StaticResource ResourceKey=gb2312 }}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=疵点位置}}" Binding="{Binding DEFMTR}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=档车工}}" Binding="{Binding STAFF,Converter={StaticResource ResourceKey=gb2312 }}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=织机号}}" Binding="{Binding WBBWBMLFDNR}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=验布工}}" Binding="{Binding WBBWARSCH,Converter={StaticResource ResourceKey=gb2312 }}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=布卷米数}}" Binding="{Binding PCEMTR}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid  >
            </Grid> 
    
</T:ViewBase>
